// 接口
interface User {}

// 函数
interface Fn {
  (a: number, b: number): number;
}

// 数组
interface Arr {
  [propName: number]: number;
}

// 类
interface Person {
  name: string;
  age: number;
}

class P implements Person {
  name = "123";
  age = 18;
}

// 函数类型
const add: () => void = function () {};
const add1: (a: number) => number = function (a: number) {
  return a;
};
